home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Developer / hex Folder / Hex.r < prev    next >
Encoding:
Text File  |  1992-09-30  |  3.9 KB  |  202 lines  |  [TEXT/MPS ]

  1. /*
  2.  * File: Hex.r
  3.  *
  4.  * Rez definitions for Hex converter program
  5.  *
  6.  *     28/1/88    Converted from TML Pascal/MDS RMaker etc to MPW 2.0.2
  7.  *    23/10/88    Converted to MPW Tool
  8.  *    15/12/88    Upgraded to MPW 3.0b1
  9.  *      6/5/90    Upgraded to MPW 3.1
  10.  *     26/5/90    Added VersionDialog entry and dialog so that version will
  11.  *                be displayed in Commando dialog
  12.  *     30/9/92    Upgraded to MPW 3.3
  13.  *                 Tidied up for release
  14.  *
  15.  * Copyright Paul Russell, ARC Electronics 1987-1992.
  16.  *
  17.  */
  18.  
  19. #include "types.r"
  20. #include "cmdo.r"
  21.  
  22. type 'MPST' as 'STR ';
  23.  
  24. resource 'MPST' (0)
  25. {
  26.     "Version 1.021"                /* MPW version resource (used by SetVersion Tool) */
  27. };
  28.  
  29. resource 'cmdo' (256) {
  30.     {
  31.         240,
  32.         "Hex reads a resource and converts it to ASCII hex",
  33.         {
  34.             NotDependent {}, Files {
  35.                 InputFile,
  36.                 RequiredFile {
  37.                     {20, 20, 40, 150},
  38.                     "Resource File…",
  39.                     "",
  40.                     "Select the resource file",
  41.                 },
  42.                 Additional {
  43.                     "",
  44.                     FilterTypes,
  45.                     "Only applications",
  46.                     "All files",
  47.                     {
  48.                         appl
  49.                     }
  50.                 }
  51.             },
  52.             NotDependent {}, CheckOption {
  53.                 NotSet,
  54.                 {20, 200, 36, 280},
  55.                 "Progress",
  56.                 "-p",
  57.                 "Write progress information to diagnostic output"
  58.             },
  59.             NotDependent {}, RegularEntry {
  60.                 "Address",
  61.                 {50, 200, 65, 260},
  62.                 {50, 260, 65, 320},
  63.                 "$0000",
  64.                 ignoreCase,
  65.                 "-a",
  66.                 "Set the start address of the ASCII HEX output file"
  67.             },
  68.             NotDependent {}, RadioButtons {
  69.                 {
  70.                     {46, 20, 61, 120},
  71.                     "Raw",
  72.                     "-h raw",
  73.                     notset,
  74.                     "Produce raw ASCII HEX output",
  75.                     
  76.                     {62, 20, 77, 120},
  77.                     "Intel",
  78.                     "-h intel",
  79.                     set,
  80.                     "Produce Intel format HEX output",
  81.                     
  82.                     {78, 20, 93, 120},
  83.                     "Motorola S1",
  84.                     "-h s1",
  85.                     notset,
  86.                     "Produce Motorola S1 format HEX output",
  87.                     
  88.                     {94, 20, 109, 120},
  89.                     "Motorola S2",
  90.                     "-h s2",
  91.                     notset,
  92.                     "Produce Motorola S2 format HEX output",
  93.                     
  94.                     {110, 20, 125, 120},
  95.                     "Motorola S3",
  96.                     "-h s3",
  97.                     notset,
  98.                     "Produce Motorola S3 format HEX output",
  99.                 }
  100.             },
  101.             NotDependent {}, RadioButtons {
  102.                 {
  103.                     {78, 130, 93, 190},
  104.                     "All",
  105.                     "-m all",
  106.                     set,
  107.                     "Convert all bytes",
  108.                     
  109.                     {94, 130, 109, 190},
  110.                     "Even",
  111.                     "-m even",
  112.                     notset,
  113.                     "Convert only even bytes",
  114.                     
  115.                     {110, 130, 125, 190},
  116.                     "Odd",
  117.                     "-m odd",
  118.                     notset,
  119.                     "Convert only odd bytes",
  120.                 }
  121.             },
  122.             NotDependent {}, RegularEntry {
  123.                 "Type",
  124.                 {70, 200, 85, 260},
  125.                 {70, 260, 85, 320},
  126.                 "CODE",
  127.                 keepCase,
  128.                 "-r",
  129.                 "Set the type of the resource to convert"
  130.             },
  131.             NotDependent {}, RegularEntry {
  132.                 "ID",
  133.                 {90, 200, 105, 260},
  134.                 {90, 260, 105, 320},
  135.                 "1",
  136.                 ignoreCase,
  137.                 "-i",
  138.                 "Set the ID of the resource to convert"
  139.             },
  140.             NotDependent {}, RegularEntry {
  141.                 "Skip",
  142.                 {110, 200, 125, 260},
  143.                 {110, 260, 125, 320},
  144.                 "4",
  145.                 ignoreCase,
  146.                 "-s",
  147.                 "Set the number of bytes to skip at the start of the resource"
  148.             },
  149.             NotDependent {}, Redirection {
  150.                 StandardOutput,
  151.                 {40, 340}
  152.             },
  153.             NotDependent {}, Redirection {
  154.                 DiagnosticOutput,
  155.                 {80, 340}
  156.             },
  157.             NotDependent {}, TextBox {
  158.                 gray,
  159.                 {30, 335, 121, 460},
  160.                 "Redirection"
  161.             },
  162.             Or {{1}}, DoItButton {
  163.             },
  164.             NotDependent {}, VersionDialog {
  165.                 VersionResource {
  166.                     'MPST', 0
  167.                 },
  168.                 "by Paul Russell, ARC Electronics, 1987-1992",
  169.                 256
  170.             }
  171.         }
  172.     }
  173. };
  174.  
  175. resource 'DLOG' (256) {
  176.     {160, 114, 248, 502},
  177.     dBoxProc,
  178.     invisible,
  179.     noGoAway,
  180.     0x0,
  181.     256,
  182.     ""
  183. };
  184.  
  185. resource 'DITL' (256, purgeable) {
  186.     {
  187.         {16, 16, 48, 48}, Icon { enabled, 256 },
  188.         {16, 64, 80, 364}, StaticText { enabled, "Hex\n\nby Paul Russell, ARC Electronics, 1987-1992" }
  189.     }
  190. };
  191.  
  192. resource 'ICON' (256) {
  193.     $"0000 0000 2727 1CA8 28A8 A2A8 28A8 A2A8"
  194.     $"28A8 A2A8 28A8 A2A8 2727 1CA8 0000 0000"
  195.     $"0000 0000 003F F800 0020 0800 0020 0800"
  196.     $"01E0 0F00 0080 0200 0040 0400 0020 0800"
  197.     $"0010 1000 0008 2000 0004 4000 0002 8000"
  198.     $"0001 0000 0000 0000 0000 0000 0000 0000"
  199.     $"001C F800 0022 0800 0022 0800 003E 1000"
  200.     $"0022 2000 0022 2000 0000 0000 0000 0000"
  201. };
  202.